package newdecoupling.intelligent_learning_assistance_system.comment;


import lombok.Data;

@Data

public class Result {

    private  Integer code;
    private  String message;
    private  Object data;

    public static Result success(Object data)
    {
        Result result = new Result();
        result.setCode(200);
        result.setMessage("success");
        result.setData(data);
        return result;
    }

    // 错误方法
    public static Result error(String message) {
        Result result = new Result();
        result.setCode(500);
        result.setMessage(message);
        return result;
    }
}
